package com.hunttown.mes.vo;

import com.hunttown.mes.rpc.domain.AnalysisManageRightMenuDTO;

import java.util.List;

/**
 * 主界面左侧菜单 View Object
 */
public class MenuVO {
    private Integer id;
    private Integer pid;
    private String code;
    private String text;
    private String url;
    private Integer menuis;     //是否菜单  0false 1true
    private String iconStyle;
    private Integer openNew;    //是否在新界面打开 0false 1true
    private Integer sort;       //排序
    private String remark;      //备注，只有超级管理员才显示

    private List<MenuVO> subMenus;


    public MenuVO(AnalysisManageRightMenuDTO dto) {
        this.id = dto.getId();
        this.pid = dto.getParentId();
        this.code = dto.getMenuNameEn();
        this.text = dto.getMenuName();
        this.menuis = dto.getPathType();
        this.iconStyle = dto.getIconUrl();
        this.openNew = dto.getOpenNew();
        if (!"#".equals(dto.getMenuPath())) {
            this.url = dto.getMenuPath();
        }
        this.sort = dto.getSort();
        this.remark = dto.getRemark();
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getIconStyle() {
        return iconStyle;
    }

    public void setIconStyle(String iconStyle) {
        this.iconStyle = iconStyle;
    }

    public List<MenuVO> getSubMenus() {
        return subMenus;
    }

    public void setSubMenus(List<MenuVO> subMenus) {
        this.subMenus = subMenus;
    }

    public Integer getMenuis() {
        return menuis;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public void setMenuis(Integer menuis) {
        this.menuis = menuis;
    }

    public Integer getOpenNew() {
        return openNew;
    }

    public void setOpenNew(Integer openNew) {
        this.openNew = openNew;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
